/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 涛
 * Date: 2023-09-23
 * Time: 17:03
 */
public class Test2 {

    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.display();
        System.out.println("==================");
        myArrayList.add(0,4);
        myArrayList.display();
        System.out.println("=====================");
        //myArrayList.add(5, 1);
        System.out.println(myArrayList.contains(8));
        System.out.println("=====================");
        System.out.println(myArrayList.indexOf(3));
        System.out.println("======================");
        System.out.println(myArrayList.get(4));
        System.out.println("=======================");
        myArrayList.set(3, 99);
        myArrayList.display();
        System.out.println("=======================");
//        myArrayList.remove(0);
//        myArrayList.display();
        System.out.println(myArrayList.size());
        System.out.println("==================");
        myArrayList.clear();
        myArrayList.display();
        System.out.println(myArrayList.size());
    }

}
